home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dirut
/
cdh50.zip
/
CDH.TXT
< prev
next >
Wrap
Text File
|
1993-12-23
|
20KB
|
508 lines
CDH
Change Directory with History
Version 5.0
Dave Kruger
Copyright (C) 1990-1993 Dave Kruger
2 2
COPYRIGHT STATEMENT
===================
CDH Copyright (C) 1990-1993 by Dave Kruger.
All rights reserved.
CDH is free, but it is a copyrighted work and may be distributed only
pursuant to this license.
Permission is hereby granted to reproduce and disseminate so long as:
(1) No remuneration of any kind is received in exchange
(2) Distribution is without ANY modification to the contents of
CDH.EXE or the accompanying documentation.
No copy of CDH may be distributed without including a copy of this
license.
Any other use is prohibited without express, written permission in
advance.
DISCLAIMER
==========
The information contained in this document is subject to change
without notice. This software and documentation are provided free of
charge and without warranty of any kind. No responsibility is
accepted for errors contained in this documentation, or for
incidental or consequential damages in connection with the
furnishing, performance, or use of the software or documentation.
TRADEMARKS
==========
MS-DOS is a registered trademark of Microsoft Corporation.
Windows is a trademark of Microsoft Corporation.
Lotus and 1-2-3 are registered trademarks of Lotus Development
Corporation
Turbo C is a registered trademark of Borland International, Inc.
4DOS is a registered trademark of JP Software Inc.
UNIX is a registered trademark of UNIX System Laboratories Inc.
3 3
CONTENTS
========
Introduction.......................3
Installation.......................4
Synopsis...........................4
Description........................4
Options............................5
Environment Variables..............6
Examples...........................6
Enhancing Usability................7
4DOS and Aliases.................7
Batch Files......................8
Environment Variables............8
Hardware Requirements..............9
Diagnostics........................9
Bugs and Enhancements..............9
Version and History...............10
INTRODUCTION
============
This manual documents version 5.0 of the CDH (Change Directory with
History) utility.
CDH replaces CHDIR, the standard MS-DOS change directory command.
CDH provides similar functionality to CHDIR, but also includes a
directory history facility.
CDH maintains a record of the last 23 directories visited in a plain
text file called the history file. You can change to a directory in
the history file by referring to it by its numeric position in the
file, or by specifying any part of its name that differentiates it
from other directory names in the history file.
CDH also supports a CDPATH environment variable. If the wanted
directory is not a subdirectory of the current directory, the paths
in the CDPATH are searched to find the wanted directory.
CDH differs functionally from MS-DOS's CHDIR command as follows:
1. If you invoke CDH without an argument, it changes to the
directory specified by the HOME environment variable.
2. Unlike CHDIR, CDH changes directories across drives. For
example, if the current directory is C:\TMP, and you enter the
command CDH D:\TC, CDH changes the current directory to \TC and
also changes the current drive to D:. This is equivalent to
entering the two MS-DOS commands: CD D:\TC and D:.
3. CDH searches the CDPATH environment variable if the wanted
directory is not in the current directory.
4 4
INSTALLATION
============
The only installation necessary to use CDH is to copy the CDH.EXE
file to a directory in your PATH.
You can customise the installation by defining environment variables,
aliases, modifying COMMAND.COM, and so on; these are explained in the
ENHANCING USABILITY section below.
SYNOPSIS
========
CDH [<dir>] [-?] [-H] [-L] [-V] [-] [-<pattern>] [-<number>]
DESCRIPTION
===========
The brackets in the synopsis above indicate that the argument is
optional, therefore, all arguments are optional. CDH takes a single
argument only, or no argument at all. There are two types of
arguments: minus (-) options and directory names. Arguments preceded
by a "-" cause the current directory to change depending on what
follows the "-". Anything else is assumed to be a directory name
that you want to change to. Case is not significant for any
argument; CDH sees no difference between -V and -v. Similarly, the
following <pattern>s are treated identically: -SnEg, -SNEG, and -sneG.
If you invoke CDH without any arguments, it changes to the directory
specified in the HOME environment variable (if set) or to the root
directory on the current drive.
The last 23 directories visited are recorded, in plain text, in the
history file. You can specify the name of the history file with the
CDHISTFILE environment variable. If CDHISTFILE is not set (or is set
to an invalid path), the directory history is written to C:\CDHIST.
If you change to a directory that is not in the history file, CDH
inserts the new directory at position zero in the history file and
moves all existing directories up by one position. If the history
file already contains 23 entries, CDH inserts the new directory at
position zero in the history file, moves all existing directories up
by one position, and deletes the oldest directory from the history
file.
You can edit the history file with any text editor, for example, EDIT
or EDLIN. You might want to edit the history file, for example, to
delete entries for directories that no longer exist, or to delete
references to directories on floppy drives. The directory history is
stored in uppercase in the history file.
5 5
You can access a directory in the history file by referring to its
numeric position in the file, using -<number> as an argument, for
example, CDH -15; or you can specify any part of a directory name
using -<pattern> as an argument, for example, CDH -NEG. Note,
however, that <pattern>s must be at least two letters long to avoid
confusion with other "-" options.
When you invoke CDH with a valid directory name (<dir>) as an
argument, CDH changes to <dir>. <dir> can be in the current
directory or in any directory in the CDPATH.
OPTIONS
=======
<dir> Changes to directory <dir>. If <dir> does not exist in
the current directory, CDH searches the directories
specified in the CDPATH environment variable. If <dir> is
invalid after these searches, CDH prints an error message